//入口文件

import Vue from 'vue'

//导入路由
import VueRouter from 'vue-router'
Vue.use(VueRouter)

//导入axios
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios,axios)
axios.defaults.baseURL = 'http://www.liulongbin.top:3005/'

//按需导入组件
import { Header,Swipe,SwipeItem } from 'mint-ui';
import { Tabbar, TabItem } from 'mint-ui';
Vue.component(Header.name, Header);
Vue.component(Tabbar.name, Tabbar);
Vue.component(TabItem.name, TabItem);
Vue.component(Swipe.name,Swipe);
Vue.component(SwipeItem.name,SwipeItem);

//导入组件样式
import 'mint-ui/lib/style.css'

//导入公共样式
import './css/common.css'

//导入mui样式
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'

//导入router模块
import router from './router.js'

//导入app
import app from './App.vue'

let vm = new Vue({
	el:'#app',
	render:c=>c(app),
	router  //挂载路由对象到实例上
})

//导入格式化时间的插件
import moment from 'moment'
//定义全局过滤器
Vue.filter('dateFormat',function(dataStr,pattern='YYYY-MM-DD HH:mm:ss'){
	return moment(dataStr).format(pattern)
})